package libs

import (
	"mime/multipart"
	"time"
	"strconv"
	"path"
)

func FilePath(h *multipart.FileHeader) (url string ,name string){
	name = Md5(strconv.FormatInt(time.Now().Unix(), 10)) + path.Ext(h.Filename)
	url = "static/upload/" + name
	return url,name
}